tests: Run rspec tests out of bazel build output#2907
Conversation
mxinden
commented
Feb 7, 2018
- Build tarball and smoke tests in previous Jenkins stage
- Unzip the release tarball
- Setup build folder and $PATH
- Make rspec use release folder instead of git repository
|
Can one of the admins verify this patch? |
| output += "Standard output: \n#{stdout}" | ||
| output += "\nStandard error: \n#{stderr}" | ||
| output += "\nEnd of journal of #{service} service on #{destination_ip}" | ||
| puts output |
There was a problem hiding this comment.
@cpanato We have the logs output as a Jenkins archive. Is the print statement to the Jenkins logs still needed?
ea2a18b to
be148ce
Compare
32f764b to
99003a3
Compare
c1fc083 to
7a03544
Compare
Jenkinsfile
Outdated
| ) { | ||
| unstash 'clean-repo' | ||
| unstash 'smoke-test-binary' | ||
| unstash 'tectonic.tar.gz' |
There was a problem hiding this comment.
I can combine the unstash lines here into a function and invoke that function in runRSpecTestBareMetal as well.
|
|
||
| def create | ||
| Dir.chdir('../../contrib/internal-cluster') do | ||
| Dir.chdir(File.join(ENV['RSPEC_PATH'], '../../contrib/internal-cluster')) do |
There was a problem hiding this comment.
Instead of relying on the current dir to be the correct dir, I use absolute paths via the RSPEC_PATH and RELEASE_TARBALL_PATH. What do you think @cpanato? Should make the framework more robust for the future.
| # SmokeTest contains helper functions to operate the smoke tests written in | ||
| # golang | ||
| module SmokeTest | ||
| def self.build |
There was a problem hiding this comment.
Smoke test binary is build by Bazel from now on.
tests/rspec/spec/spec_helper.rb
Outdated
| config.silence_filter_announcements = true | ||
|
|
||
| # Untar release tarball | ||
| # TODO: Pipe tar output to /dev/null |
| raise 'failed to untar build tarball' unless succeeded | ||
|
|
||
| # Add terraform binary to path | ||
| ENV['PATH'] = |
There was a problem hiding this comment.
With the new CLI, this should not be needed anymore.
|
@cpanato Would you mind giving this another review? Looking forward to your thoughts. |
Jenkinsfile
Outdated
|
|
||
| cp bazel-bin/tectonic.tar.gz . | ||
| cp bazel-bin/tests/smoke/linux_amd64_stripped/smoke . | ||
| ls -la |
|
can we run on aws as well? make a few comments. this looks great to me 😄 nice job to adapt to use bazel! |
0. Build tarball and smoke tests in previous Jenkins stage 1. Unzip the release tarball 2. Setup build folder and $PATH 3. Make rspec use release folder instead of git repository